﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Login</title>
<link rel="stylesheet" type="text/css" href="../S01/CHS/css/common.css" />
<link rel="stylesheet" type="text/css" href="../S01/CHS/css/date_picker.css" />
<script type="text/javascript" src="/common/ajax.js"></script>
<script type="text/javascript" src="/common/xmldom.js"></script>
<script type="text/javascript" src="/common/utility.js"></script>
<script type="text/javascript" src="/common/alias/AliCMS.MemberModule.js"></script>
<script type="text/javascript" src="../js/date_picker.js"></script>
<script type="text/javascript">
var _action, _type;
function XmlHttpCallBack(xmlHttp)
{
	if (xmlHttp.responseText.indexOf("<error>") != 0)
	{
		if (_action == "List")
		{
			var _xmlMember = CreateXmlDom();
			if (_xmlMember.documentElement == null || _xmlMember.documentElement.childNodes.length == 0)
			{
				alert("你输入的用户不存在！");
			}
			else
			{
				var innerID = _xmlMember.documentElement.childNodes[0].selectSingleNode(AliCMS.MemberModule.Member.InnerID).text;
				if (_type == 1)
				{
					_action = "SendPasswordToMail";
					_ajax.Post("/alicms.aspx?Object=Member&Operation=SendPasswordToMail&ID=" + innerID, null, XmlHttpCallBack);
				}
				else
				{
					_action = "GetQuestion";
					_ajax.Post("/alicms.aspx?Object=Member&Operation=AnswerQuestion&ID=" + innerID, null, XmlHttpCallBack);
				}
			}
		}
		else if (_action == "SendPasswordToMail")
		{
			alert("密码已成功发送到你的注册邮箱里!");
		}
		else if (_action == "GetQuestion")
		{
			var result = prompt("请回答问题：" + xmlHttp.responseText, "");
			if (result != null)
			{
				_action = "GetPassword";
				_ajax.Post("/alicms.aspx?Object=Member&Operation=AnswerQuestion&ID=" + innerID + "&PasswordAnswer=" + result, null, XmlHttpCallBack);
			}
		}
		else if (_action == "GetPassword")
		{
			if (xmlHttp.responseText == "")
				alert("回答不正确！");
			else
				alert("恭喜您，回答正确！\r\n您的密码是：" + xmlHttp.responseText);
		}
	}
	else
	{
		if (_action == "SendPasswordToMail")
			alert("发送密码到注册邮箱时发生错误!");
		else
			alert("发生错误!");
	}

	document.getElementById("Submit").disabled = false;
}

function OnSubmit(form, type)
{
	if (form.Name.value == "")
	{
		alert("名称不能空！");
		form.Name.select();
		return false;
	}
	
	var data = "Name=" + form.Name.value;
	
	document.getElementById("Submit").disabled = true;
	_action = "List";
	_type = type;
	_ajax.Post("/alicms.aspx?Object=Member&Operation=List&Page=1&PageSize=1&Condition=" + UrlEncode(data), null, XmlHttpCallBack);
	
	return false;
}
</script>
</head>
<body>
<!-- #BeginLibraryItem "lib/header.lbi" -->
<div class="Header">
	<a href="http://alicms.cn"><img src="../S01/CHS/image/temp/logo.gif" /></a>
	<a href="http://alicms.cn"><img src="../S01/CHS/image/temp/banner.jpg" /></a>
</div>
<!-- #EndLibraryItem -->
<!-- #BeginLibraryItem "lib/menu.lbi" -->
<ul class="TabMenuBar">
	<li class="Current"><a href="#"><span>会员中心</span></a></li>
	<li><a href="#"><span>网上商店</span></a></li>
	<li><a href="#"><span>文章管理</span></a></li>
	<li><a href="#"><span>新闻管理</span></a></li>
	<li><a href="#"><span>音乐管理</span></a></li>
	<li><a href="#"><span>图片管理</span></a></li>
	<li><a href="#"><span>视频管理</span></a></li>
	<li><a href="#"><span>电影管理</span></a></li>
	<li><a href="#"><span>网址管理</span></a></li>
</ul>
<div class="MenuBar">
	<a href="#">会员登陆</a>
	<a href="#">会员注册</a>
</div>
<!-- #EndLibraryItem -->
<div class="Path"><label>当前位置：</label> <a href="#">首页</a> &gt; <a href="#">会员中心</a> &gt; 会员登陆</div>
<div class="Wrap">
	<div class="Block1">
		<h1>温馨提示</h1>
		<ul class="List1">
			<li>提供两种方式找回密码：发送密码到注册邮箱和回答问题。</li>
			<li>发送密码到注册邮箱的方式中，注册邮箱必须是正确的。否则发送可能会失败。</li>
		</ul>
	</div>
	<div class="Block2">
		<form onsubmit="return OnSubmit(this.form, 1)" class="Block3">
			<dl>
				<dt>会员名：</dt>
				<dd><input type="text" name="Name" maxlength="50" /></dd>
			</dl>
			<input type="submit" id="Submit1" value="发送密码到注册邮箱" onclick="OnSubmit(this.form, 1)" />&nbsp;&nbsp;&nbsp;&nbsp;
			<input type="button" id="Submit2" value="回答问题" onclick="OnSubmit(this.form, 2)" />
		</form>
	</div>
</div>
<!-- #BeginLibraryItem "lib/footer.lbi" -->
<div class="Footer"> 版权所有 乌鲁木齐爱革网络科技有限公司 <br />
		<br />
	<br />
	<br />
	<br />
	<br />
	<br />
</div>
<!-- #EndLibraryItem -->
</body>
</html>
